package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.entity.DishFlavor;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface DishFlavorMapper {
    /**
     * 批量插入口味
     * @param flavors 口味的实体类集合
     */
    @AutoFill(OperationType.INSERT)
    void insertFlavor(List<DishFlavor> flavors);

    /**
     * 根据菜品id删除口味
     * @param DishId 菜品id
     */
    void deleteFlavorByDishId(Long DishId);

    /**
     *  根据菜品id查询口味关联信息
     * @param dishId 菜品id
     * @return 菜品口味关联信息
     */
    List<DishFlavor> getFlavorByDishId(Long dishId);


}
